using System;
using System.Collections.Generic;
using System.Text;

namespace mds.Queue.Generic
{
    /// <summary>
    /// Subset of the <see cref="Microsoft.Ccr.Core.TaskExecutionPolicy">TaskExecutionPolicy</see> for Queue constrains.
    /// </summary>
    public enum TaskExecutionQueuePolicy
    {       
        /// <summary>
        /// Queue enforces maximum depth (specified at queue creation) 
        /// and discards tasks enqueued after the limit is reached
        /// </summary>
        ConstrainQueueDepthDiscardTasks = Microsoft.Ccr.Core.TaskExecutionPolicy.ConstrainQueueDepthDiscardTasks,
        /// <summary>
        /// Queue enforces maximum depth (specified at queue creation)
        /// but does not discard any tasks. It forces the thread posting any tasks after the limit is reached, to
        /// sleep until the queue depth falls below the limit
        /// </summary>
        ConstrainQueueDepthThrottleExecution = Microsoft.Ccr.Core.TaskExecutionPolicy.ConstrainQueueDepthThrottleExecution,        
    }

    /// <summary>
    /// Subset of the <see cref="Microsoft.Ccr.Core.TaskExecutionPolicy">TaskExecutionPolicy</see> for Scheduling constrains.
    /// </summary>
    public enum TaskExecutionSchedulingPolicy
    {        
        
        /// <summary>
        /// Queue enforces the rate of task scheduling specified at queue creation
        /// and discards tasks enqueued after the current scheduling rate is above the specified rate
        /// </summary>
        ConstrainSchedulingRateDiscardTasks =  Microsoft.Ccr.Core.TaskExecutionPolicy.ConstrainSchedulingRateDiscardTasks,
        /// <summary>
        /// Queue enforces the rate of task scheduling specified at queue creation
        /// and forces the thread posting tasks to sleep until the current rate of task scheduling falls below
        /// the specified average rate
        /// </summary>
        ConstrainSchedulingRateThrottleExecution = Microsoft.Ccr.Core.TaskExecutionPolicy.ConstrainSchedulingRateThrottleExecution
    }
 

}
